package com.ttctracker.xmlparser;

import java.util.HashMap;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class RouteTagsHandler extends DefaultHandler{
	private HashMap<String, String> route_tags;

	@Override
	public void startDocument() throws SAXException {
		route_tags=new HashMap<String, String>();
	}

	@Override
	public void startElement(String uri, String localName, String qName,
			Attributes attributes) throws SAXException {
		if (localName.equals("route")) {
			route_tags.put(attributes.getValue("tag"), attributes.getValue("title").replace("-", " "));
		}
		return;
	}

	public HashMap<String, String> getRoute_tags() {
		return route_tags;
	}
	
	
}
